﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Group.aspx.cs" Inherits="iEN.Schedule.Group" MaintainScrollPositionOnPostback="true" EnableEventValidation="false"%>
<%@ Register src="../UserControl/TopMenu.ascx" tagname="TopMenu" tagprefix="uc2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            height: 18px;
        }
        .style2
        {
            height: 36px;
        }
        .style3
        {
            width: 16%;
        }
        .style4
        {
            width: 37%;
        }
        .style5
        {
            width: 10%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true">
        </asp:ScriptManager>
    </div>
    <center>
    
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <table  style="width: 952px">  
        <tr>
            <td><uc2:TopMenu ID="TopMenu1" runat="server" /></td>                
        </tr>
        <tr>
            <td style="background-image:url('../images/title_back.gif')" align="center" ; width="952px" >
                <asp:Label ID="Label1" runat="server" Text="群 組 管 理" BackColor="Transparent" 
                    Font-Names="標楷體" Font-Size="XX-Large" ForeColor="Blue"></asp:Label>
            </td>              
        </tr>
        <tr>
            <td align="center">
                
                    <asp:Label ID="lblMsg" runat="server" Font-Names="微軟正黑體" Font-Size="X-Large" 
                        ForeColor="Red" Text="你沒有瀏覽此頁面的權限" Visible="False"></asp:Label>
                
                    <asp:Panel ID="Panel1" runat="server" BackColor="Transparent" 
                        Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="16px" ForeColor="Black" 
                        GroupingText="群組列表" style="width: 952px">
                        <asp:GridView ID="gvGroupList" runat="server" AutoGenerateColumns="False" 
                            CellPadding="4" EmptyDataText="尚未設定相關資料！" 
                            ForeColor="#333333" HorizontalAlign="Center" PageSize="10" 
                            style="margin-top: 0px" Width="900px" 
                            onselectedindexchanged="gvGroupList_SelectedIndexChanged" 
                            onrowcreated="gvGroupList_RowCreated" AllowPaging="True" 
                            onpageindexchanging="gvGroupList_PageIndexChanging">
                            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#E3EAEB" Font-Size="Medium" />
                            <EmptyDataRowStyle CssClass="note" />
                            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Right" />
                            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#1C5E55" Font-Bold="True" Font-Size="Medium" 
                                ForeColor="White" />
                            <EditRowStyle BackColor="PaleGoldenrod" />
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:BoundField DataField="GroupID" HeaderText="id" SortExpression="GroupID" />
                                <asp:BoundField DataField="GroupName" HeaderText="群組名稱" ReadOnly="True" 
                                    SortExpression="GroupName">
                                <HeaderStyle Font-Names="Arial,sans-serif" HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="DeviceNames" HeaderText="設備名稱" ReadOnly="True" 
                                    SortExpression="DeviceNames">
                                <HeaderStyle Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" 
                                    HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:CommandField ButtonType="Button" EditText="選取" 
                                    ShowSelectButton="True" SelectText="選取">
                                <ItemStyle Width="50px" />
                                </asp:CommandField>
                                <asp:TemplateField ShowHeader="False">
                                    <ItemTemplate>
                                        <asp:Button ID="btnDelete" 
                                            CommandName="Delete" 
                                            Text="刪除" 
                                            OnClientClick="return confirm('是否刪除？');"
                                            CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" 
                                            runat="server" oncommand="btnDelete_Command" />
                                    </ItemTemplate>
                                    <ItemStyle Width="50px" />
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                    </asp:Panel>
        <tr>
            <td class="style2">
                
                    <asp:Button ID="btAddTag" runat="server" 
                        Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="Medium" 
                        onclick="btAddTag_Click" Text="新增" />
        <tr>
            <td align="center" class="style1">
                <asp:Panel ID="Panel2" runat="server" BackColor="Transparent" 
                        Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="16px" ForeColor="Black" 
                        GroupingText="群組設定" style="width: 952px" Visible="False">
                <table style="width: 70%;" border="0" frame="above" cellpadding="5">
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label2" runat="server" Font-Size="Medium" ForeColor="Black" 
                                Text="群組名稱："></asp:Label>
                        </td>
                        <td align="left" class="style4">
                            <asp:TextBox ID="tbxGroupName" runat="server" CssClass="normaltext" Width="95%"></asp:TextBox>
                        </td>
                        <td align="left" class="style5">
                            <asp:Label ID="lbGroupID" runat="server" Text="Label" Visible="False"></asp:Label>
                        </td>
                        <td align="left" class="style4">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label3" runat="server" ForeColor="Black" Text="設備名稱：" 
                                Font-Size="Medium"></asp:Label>
                        </td>
                        <td class="style4" align="left">
                            <asp:Label ID="Label4" runat="server" ForeColor="Black" Text="請選擇欲加入之設備：" Font-Size="Medium"></asp:Label>
                            <br />
                            <asp:ListBox ID="lbxSource" runat="server" SelectionMode="Multiple" 
                                Height="100px" Width="100%">
                            </asp:ListBox>
                        </td>
                        <td align="left" class="style5">
                            <br />
                            <asp:Button ID="btnAdd" runat="server" Text="加入 &gt;&gt;" 
                                onclick="btnAdd_Click" />
                            <br />
                            <br />
                            <asp:Button ID="btnRemove" runat="server" Text="&lt;&lt; 移除" 
                                onclick="btnRemove_Click" />
                        </td>
                        <td align="left" class="style4">
                            <asp:Label ID="Label5" runat="server" ForeColor="Black" Text="請選擇欲移除之設備：" Font-Size="Medium"></asp:Label>
                            <br />
                            <asp:ListBox ID="lbxTarget" runat="server" SelectionMode="Multiple" 
                                Height="100px" Width="100%">
                            </asp:ListBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style3">
                        </td>
                        <td align="left" class="style4">
                            <asp:Button ID="btnOK" runat="server" 
                                Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="Medium" Text="確認" 
                                onclick="btnOK_Click" 
                                 />
                            <asp:Button ID="btnCancel" runat="server" 
                                Font-Names="微軟正黑體,新細明體,標楷體,Arial,sans-serif" Font-Size="Medium" Text="取消" 
                                onclick="btnCancel_Click" />
                        </td>
                        <td align="left" class="style5">
                            &nbsp;</td>
                        <td align="left" class="style4">
                            &nbsp;</td>
                    </tr>
                </table>
                </asp:Panel>
            </td>
        </tr>
    </table>

        </ContentTemplate>
        </asp:UpdatePanel>
    
        
    </center>
    </form>
</body>
</html>
